// routes/example.js
const express = require('express');
const router = express.Router();
const checkPermission = require('../middleware/checkPermission');
const auth = require('../middleware/auth');

router.get('/protected-route', auth, checkPermission('view_protected_route'), (req, res) => {
  res.json({ message: 'You have access to this route' });
});

module.exports = router;